import Vue from 'vue'
import VueRouter from 'vue-router'
// 导入路由模块
import filmsRoutes from "./modules/films"
import cinemasRoutes from "./modules/cinemas"
import infomationRoutes from "./modules/infomation"
import ucenter from "./modules/ucenter"
Vue.use(VueRouter)

const routes = [
  {
    path:"/",
    redirect:"/films/nowPlaying"
  },
    ...filmsRoutes,
    ...cinemasRoutes,
    ...infomationRoutes,
    ...ucenter
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router